The OSK may be created and destroyed, while it connects to signals from the
longer-lived InputMethod object. This makes these signals linger and issue
copious warnings while trying to change the extended keymap and new ratio
on a defunct OSK.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6085
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2543>
this._ensureKeysForGroup(this._keyboardController.getCurrentGroup());
this._setActiveLayer(0);
- Main.inputMethod.connect(
- 'terminal-mode-changed', this._onTerminalModeChanged.bind(this));
+ Main.inputMethod.connectObject(
+ 'terminal-mode-changed', this._onTerminalModeChanged.bind(this),
+ this);
this._keyboardController.connectObject(
'active-group', this._onGroupChanged.bind(this),